<template>
  <div class="evn">
    <Row :gutter="20" style="margin-bottom:10px">
      <Col :span="8">
        <span class="text">环境温度：</span>
        <span class="text">{{envObj.temperature| noDataFormat}}℃</span>
      </Col>
      <Col :span="8">
        <span class="text">环境相对湿度：</span>
        <span class="text">{{envObj.humidity| noDataFormat}}%</span>
      </Col>
      <Col :span="8">
        <span class="text">风速：</span>
        <span class="text">{{envObj.windSpeed| noDataFormat}}m/s</span>
      </Col>
    </Row>
    <Row :gutter="20">
      <Col :span="8">
        <span class="text">风向：</span>
        <span class="text">{{direction[envObj.windDire-1]| noDataFormat}}</span>
      </Col>
      <Col :span="8">
        <span class="text">大气压力：</span>
        <span class="text">{{envObj.pressure| noDataFormat}}Pa</span>
      </Col>
    </Row>
  </div>
</template>
<script>
import {windEnvOverview} from '@/api/scada'
export default {
  name: "echart",
  props: {},
  data() {
    return {
      envObj:{},
      direction: ["东","南","西","北","东南","东北","西南","西北" ]
      }
  },
  computed: {},
  created() {},
  mounted() {
    windEnvOverview().then(res=>{
      this.envObj = res.result || {}
    })
  },
  watch: {},
  methods: {},
  components: {}
};
</script>

<style scoped lang="scss">
.text {
  color: #343434;
}
</style>
